/**
 * 
 */
package com.lx.helloworld.eureka.consumer.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.lx.helloworld.eureka.consumer.HelloProvider;
import com.lx.helloworld.eureka.consumer.entity.User;
import com.lx.helloworld.eureka.consumer.provider.UserProvider;

/* author:tracy.bai
date:2018年10月24日 上午10:44:17
 **/
/**
 * @author tracy.bai
 *
 */
@RestController
public class UserController {
	
	@Autowired
    UserProvider userProvider;
 
    @RequestMapping(value="/users/list",produces = { "application/json;charset=UTF-8" })
    @ResponseBody
    public List<User> index() {
        return userProvider.list();
    }

}
